<%@ page contentType="text/html; charset=utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  

    <script src="${pageContext.request.contextPath }/scripts/boot.js" type="text/javascript"></script>
     
    
</head>
<% String id = request.getParameter("id"); %>
<style type="text/css">
  	 html,body{
        margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;
    }   
</style>

<body>

    <div style="width:100%;">
        <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
            <table style="width:100%;">
                <tr>
                    <!-- <td style="width:100%;">
                       
                        <a class="mini-button" iconCls="icon-find" onclick="edit()">查看</a>
                              
                    </td>
                    <td style="white-space:nowrap;">
                    
                        <input id="key1" class="mini-textbox" emptyText="请输入单位码" style="width:150px;" onenter="onKeyEnter"/>   
                        <input id="key2" class="mini-textbox" emptyText="请输入单位名称" style="width:150px;" onenter="onKeyEnter"/>   
                        <a class="mini-button" iconCls="icon-search" onclick="search()">查询</a>
                    	<a class="mini-button" iconCls="icon-remove" onclick="reset()">重置</a>
                    </td> -->
                </tr>
            </table>           
        </div>
    </div>
     <div class="mini-fit"> 
    <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowResize="true"
        url="${pageContext.request.contextPath }/cs_ounit.do?method=getcs_ounitls&id=<%=id%>" frozenStartColumn="0" frozenEndColumn="4" idField="id" multiSelect="true" 
    >
    
        <div property="columns">
            <!--<div type="indexcolumn"></div>        -->
            <div type="checkcolumn" ></div> 
	   <div field="time" width="120" headerAlign="center" allowSort="true" dateFormat="yyyy-MM-dd HH:mm:ss">操作时间</div>
	   <div field="aab999" width="120" headerAlign="center" allowSort="true">单位编号</div>
       <div field="aab004" width="120" headerAlign="center" allowSort="true">单位名称</div>
       <div field="aab019" width="120" headerAlign="center" allowSort="true">单位类型</div>
       <div field="aab131" width="120" headerAlign="center" allowSort="true">统一社会信用代码</div>
       <div field="aab003" width="120" headerAlign="center" allowSort="true">组织机构代码</div>
       <div field="aab030" width="120" headerAlign="center" allowSort="true">地税登记证号</div>
       <div field="aae004" width="120" headerAlign="center" allowSort="true">联系人</div>
       <div field="aae005" width="120" headerAlign="center" allowSort="true">联系电话</div>
       <div field="aab013" width="120" headerAlign="center" allowSort="true">法定代表人姓名</div>
       <div field="aac0581" width="120" headerAlign="center" allowSort="true">法定代表人证件类型</div>
       <div field="aab014" width="120" headerAlign="center" allowSort="true">法定代表人/负责人证件号码</div>
       <div field="bae182" width="120" headerAlign="center" allowSort="true">法定代表人联系电话</div>
       <div field="aab0781" width="120" headerAlign="center" allowSort="true">注册区划</div>
       <div field="aab0731" width="120" headerAlign="center" allowSort="true">注册街道</div>
       <div field="aab0741" width="120" headerAlign="center" allowSort="true">注册社区</div>
       <div field="aab156" width="120" headerAlign="center" allowSort="true">注册地址</div>
       <div field="aab0771" width="120" headerAlign="center" allowSort="true">经营/办公地区划</div>
       <div field="aab0811" width="120" headerAlign="center" allowSort="true">经营/办公地街道</div>
       <div field="aab0821" width="120" headerAlign="center" allowSort="true">经营/办公地社区</div>
       <div field="aab157" width="120" headerAlign="center" allowSort="true">经营/办公地址</div>
       <div field="aae051" width="120" headerAlign="center" allowSort="true">批准文号</div>
       <div field="aae048" width="120" headerAlign="center" allowSort="true">批准单位/注册登记机关</div>
       <div field="aae049" width="120" headerAlign="center" allowSort="true" dateFormat="yyyy-MM-dd" ondrawdate="onDrawDate">批准日期/成立日期</div>
	   <div field="aaa149" width="120" headerAlign="center" allowSort="true">行业风险类别</div>
	   <div field="aac047" width="120" headerAlign="center" allowSort="true">邮编</div>
	   <div field="aab006" width="120" headerAlign="center" allowSort="true">工商营业执照种类</div>
	   <div field="aab007" width="120" headerAlign="center" allowSort="true">工商营业执照号码</div>
	   <div field="aab008" width="120" headerAlign="center" allowSort="true" dateFormat="yyyy-MM-dd">工商营业发照日期</div>
	   <div field="aab009" width="120" headerAlign="center" allowSort="true">工商营业执照有效期限</div>
	   <div field="aab021" width="120" headerAlign="center" allowSort="true">隶属关系</div>
        </div>
    </div>
    </div>

    <script type="text/javascript">
        mini.parse();

        var grid = mini.get("datagrid1");
        grid.load();        
        
        function edit() {
            var row = grid.getSelected();
            if (row) {
                mini.open({
                    url: bootPATH + "../page/AB01/ounit/AB01_edit3.jsp",
                    title: "编辑", width: 850, height: 600,
                    onload: function () {
                        var iframe = this.getIFrameEl();
                        var data = { action: "edit", id: row.aab999 };
                        iframe.contentWindow.SetData(data);
                    
                    },
                    ondestroy: function (action) {
                        grid.reload();
                        
                    }
                });
                
            } else {
                mini.alert("请选中一条记录");
            }
            
        }
       
         function search() {
            var key1 = mini.get("key1").getValue().trim();
            var key2 = mini.get("key2").getValue().trim();
            if(key1==key2&key1==""){
			mini.alert("请输入单位码或单位名称!");
			}
            grid.load({ key1: key1,key2: key2});
        }
        function onKeyEnter(e) {
            search();
        }
        function reset(){
			mini.get("key1").setValue("");
			mini.get("key2").setValue("");
		//	window.location.reload();
		}
       
        
        
       
    </script>

   
</body>
</html>
